20230322
[shlib.git] / testing / 2.scripttest_testing.Testing for scripttest.unit / 7.scripttest_example.application example.dir / 1.loopback_testing.sh
blobea847deeed93cae0888faad73e5a290ad31aa6b4
1 #!/bin/bash
3 ############################################################
4 # Copyright (C) 2022- Free Software Foundation, Inc.
5 # This configure script is free software; the Free Software
6 # Foundation gives unlimited permission to copy, distribute
7 # and modify it.
9 . shlibinc
10 include stdio.shlib
11 include dbgout.shlib
13 init_dbglogout 2 testing 20000
15 dbgout "$0\n"
17 err "$0\n"
19 echo $0
21 cd scripts
23 dbgout "================================\n"
24 dbgout "clean test dir.\n"
25 dbgout "================================\n"
26 scripttest -c
29 # 在testing目录的测试例子中,第3个测试会遇到failed
30 # 在测试遇到failed时,使用-v参数显示具体测试信息。
31 # todo:程序中可改进成测试过程中,单个测试item调试信息输出,在测试程序长时间运行在某一项测试时,有调试信息输出。
32 dbgout "================================\n"
33 dbgout "test all, continously without err diff info.\n"
34 dbgout "================================\n"
35 scripttest -A
37 dbgout "================================\n"
38 dbgout "it seems have some problem on loop-back-testing.\n"
39 dbgout "use -L to test lastest error item, and get the diff\n"
40 dbgout "from old info.\n"
41 dbgout "================================\n"
42 scripttest -L
43 dbgout "================================\n"
44 dbgout "use -q -v to display script full info string.\n"
45 dbgout "================================\n"
46 scripttest -L -q -v
47 dbgout "================================\n"
48 dbgout "analyze problem, and fix it, then use -u to save output\n"
49 dbgout "to standard item output content.\n"
50 dbgout "================================\n"
51 scripttest -L -u
52 dbgout "================================\n"
53 dbgout "and test again, check if it is ok. then test next one\n"
54 dbgout "================================\n"
55 scripttest -L
57 dbgout "================================\n"
58 dbgout "clean test dir.\n"
59 dbgout "================================\n"
60 scripttest -c
62 dbgout "================================\n"